<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">


<meta name="wpd_version" content="0.2">
<meta name="wpd_baseurl" content="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0000.html">
<meta name="wpd_url" content="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0000.html">
<meta name="wpd_date" content="2017-07-17T11:20Z">

        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>C++ 入门 | W3School C++ 教程</title>
        
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.5">
        <meta name="author" content="wizardforcel">
        
        <meta name="HandheldFriendly" content="true">
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="https://wizardforcel.gitbooks.io/w3school-cpp/content/gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
        
    
    
        
        
        
    
        
        
        
    
        
        
        
    
        
        
        
    
    

        
    
    
    <link rel="next" href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0001-cpp-intro.html">
    
    
    <link rel="prev" href="https://wizardforcel.gitbooks.io/w3school-cpp/content/index.html">
    

        
    
<link rel="stylesheet" type="text/css" href="0000.css" media="all">
</head>
<body>
        
        
    <div class="book without-animation with-summary font-size-2 font-family-1" data-level="1" data-chapter-title="C++ 入门" data-filepath="Text/0000.md" data-basepath=".." data-revision="Thu Dec 31 2015 03:14:49 GMT+0000 (UTC)" data-innerlanguage="">
    

<div class="book-summary"><div class="book-search" role="search"><input class="form-control" placeholder="Type to search" type="text"></div>
    <nav role="navigation">
        <ul class="summary">
            
            
            
                
                <li>
                    <a href="https://www.gitbook.com/book/wizardforcel/w3school-cpp" target="blank" class="custom-link">W3School C++ 教程</a>
                </li>
            
            

            
            <li class="divider"></li>
            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/index.html">
                
                        <i class="fa fa-check"></i>
                        
                        介紹
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="1" data-path="Text/0000.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0000.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        C++ 入门
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="Text/0001-cpp-intro.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0001-cpp-intro.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        C++ 简介
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="Text/0002-cpp-environment-setup.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0002-cpp-environment-setup.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        C++ 环境设置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="Text/0003-cpp-basic-syntax.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0003-cpp-basic-syntax.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        C++ 基本语法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="Text/0004-cpp-comments.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0004-cpp-comments.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        C++ 注释
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="Text/0005-cpp-data-types.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0005-cpp-data-types.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        C++ 数据类型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="Text/0006-cpp-variable-types.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0006-cpp-variable-types.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        C++ 变量类型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="Text/0007-cpp-variable-scope.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0007-cpp-variable-scope.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        C++ 变量作用域
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="Text/0008-cpp-constants-literals.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0008-cpp-constants-literals.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.8.</b>
                        
                        C++ 常量
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="Text/0009-cpp-modifier-types.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0009-cpp-modifier-types.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.9.</b>
                        
                        C++ 修饰符类型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="Text/0010-cpp-storage-classes.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0010-cpp-storage-classes.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.10.</b>
                        
                        C++ 存储类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="Text/0011-cpp-operators.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0011-cpp-operators.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.11.</b>
                        
                        C++ 运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="Text/0012-cpp-loops.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0012-cpp-loops.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.12.</b>
                        
                        C++ 循环
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.12.1" data-path="Text/0013-cpp-while-loop.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0013-cpp-while-loop.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.12.1.</b>
                        
                        C++ while 循环
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.12.2" data-path="Text/0014-cpp-for-loop.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0014-cpp-for-loop.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.12.2.</b>
                        
                        C++ for 循环
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.12.3" data-path="Text/0015-cpp-do-while-loop.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0015-cpp-do-while-loop.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.12.3.</b>
                        
                        C++ do...while 循环
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.12.4" data-path="Text/0016-cpp-nested-loops.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0016-cpp-nested-loops.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.12.4.</b>
                        
                        C++ 嵌套循环
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.12.5" data-path="Text/0017-cpp-break-statement.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0017-cpp-break-statement.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.12.5.</b>
                        
                        C++ break 语句
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.12.6" data-path="Text/0018-cpp-continue-statement.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0018-cpp-continue-statement.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.12.6.</b>
                        
                        C++ continue 语句
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.12.7" data-path="Text/0019-cpp-goto-statement.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0019-cpp-goto-statement.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.12.7.</b>
                        
                        C++ goto 语句
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="Text/0020-cpp-decision.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0020-cpp-decision.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.13.</b>
                        
                        C++ 判断
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="Text/0021-cpp-if.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0021-cpp-if.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.13.1.</b>
                        
                        C++ if 语句
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.13.2" data-path="Text/0022-cpp-if-else.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0022-cpp-if-else.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.13.2.</b>
                        
                        C++ if...else 语句
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.13.3" data-path="Text/0023-cpp-nested-if.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0023-cpp-nested-if.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.13.3.</b>
                        
                        C++ 嵌套 if 语句
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.13.4" data-path="Text/0024-cpp-switch.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0024-cpp-switch.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.13.4.</b>
                        
                        C++ switch 语句
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.13.5" data-path="Text/0025-cpp-nested-switch.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0025-cpp-nested-switch.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.13.5.</b>
                        
                        C++ 嵌套 switch 语句
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="Text/0026-cpp-functions.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0026-cpp-functions.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.14.</b>
                        
                        C++ 函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="Text/0027-cpp-numbers.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0027-cpp-numbers.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.15.</b>
                        
                        C++ 数字
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="Text/0028-cpp-arrays.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0028-cpp-arrays.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.16.</b>
                        
                        C++ 数组
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.16.1" data-path="Text/0029-cpp-multi-dimensional-arrays.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0029-cpp-multi-dimensional-arrays.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.16.1.</b>
                        
                        C++ 多维数组
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.16.2" data-path="Text/0030-cpp-pointer-to-an-array.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0030-cpp-pointer-to-an-array.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.16.2.</b>
                        
                        C++ 指向数组的指针
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.16.3" data-path="Text/0031-cpp-passing-arrays-to-functions.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0031-cpp-passing-arrays-to-functions.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.16.3.</b>
                        
                        C++ 传递数组给函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.16.4" data-path="Text/0032-cpp-return-arrays-from-function.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0032-cpp-return-arrays-from-function.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.16.4.</b>
                        
                        C++ 从函数返回数组
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.17" data-path="Text/0033-cpp-strings.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0033-cpp-strings.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.17.</b>
                        
                        C++ 字符串
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.18" data-path="Text/0034-cpp-pointers.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0034-cpp-pointers.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.18.</b>
                        
                        C++ 指针
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.18.1" data-path="Text/0035-cpp-null-pointers.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0035-cpp-null-pointers.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.18.1.</b>
                        
                        C++ Null 指针
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.18.2" data-path="Text/0036-cpp-pointer-arithmetic.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0036-cpp-pointer-arithmetic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.18.2.</b>
                        
                        C++ 指针的算术运算
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.18.3" data-path="Text/0037-cpp-pointers-vs-arrays.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0037-cpp-pointers-vs-arrays.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.18.3.</b>
                        
                        C++ 指针 vs 数组
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.18.4" data-path="Text/0038-cpp-array-of-pointers.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0038-cpp-array-of-pointers.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.18.4.</b>
                        
                        C++ 指针数组
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.18.5" data-path="Text/0039-cpp-pointer-to-pointer.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0039-cpp-pointer-to-pointer.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.18.5.</b>
                        
                        C++ 指向指针的指针（多级间接寻址）
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.18.6" data-path="Text/0040-cpp-passing-pointers-to-functions.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0040-cpp-passing-pointers-to-functions.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.18.6.</b>
                        
                        C++ 传递指针给函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.18.7" data-path="Text/0041-cpp-return-pointer-from-functions.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0041-cpp-return-pointer-from-functions.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.18.7.</b>
                        
                        C++ 从函数返回指针
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.19" data-path="Text/0042-cpp-references.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0042-cpp-references.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.19.</b>
                        
                        C++ 引用
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.19.1" data-path="Text/0043-passing-parameters-by-references.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0043-passing-parameters-by-references.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.19.1.</b>
                        
                        C++ 把引用作为参数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.19.2" data-path="Text/0044-returning-values-by-reference.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0044-returning-values-by-reference.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.19.2.</b>
                        
                        C++ 把引用作为返回值
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.20" data-path="Text/0045-cpp-date-time.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0045-cpp-date-time.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.20.</b>
                        
                        C++ 日期 &amp; 时间
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.21" data-path="Text/0046-cpp-basic-input-output.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0046-cpp-basic-input-output.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.21.</b>
                        
                        C++ 基本的输入输出
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.22" data-path="Text/0047-cpp-data-structures.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0047-cpp-data-structures.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.22.</b>
                        
                        C++ 数据结构
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="Text/49.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/49.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        C++ 面向对象
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="Text/50.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/50.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        C++ 类 &amp; 对象
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="Text/51.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/51.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.1.</b>
                        
                        类 &amp; 对象详解
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="Text/52.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/52.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.2.</b>
                        
                        C++ 类成员函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="Text/53.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/53.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.3.</b>
                        
                        C++ 类访问修饰符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.4" data-path="Text/54.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/54.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.4.</b>
                        
                        C++ 类构造函数 &amp; 析构函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.5" data-path="Text/55.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/55.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.5.</b>
                        
                        C++ 拷贝构造函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.6" data-path="Text/56.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/56.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.6.</b>
                        
                        C++ 友元函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.7" data-path="Text/57.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/57.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.7.</b>
                        
                        C++ 内联函数
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.8" data-path="Text/58.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/58.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.8.</b>
                        
                        C++ this 指针
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.9" data-path="Text/59.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/59.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.9.</b>
                        
                        C++ 指向类的指针
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.10" data-path="Text/60.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/60.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.10.</b>
                        
                        C++ 类的静态成员
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="Text/61.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/61.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        C++ 继承
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="Text/62.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/62.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        C++ 重载运算符和重载函数
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.3.1" data-path="Text/63.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/63.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.1.</b>
                        
                        C++ 一元运算符重载
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.2" data-path="Text/64.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/64.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.2.</b>
                        
                        C++ 二元运算符重载
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.3" data-path="Text/65.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/65.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.3.</b>
                        
                        C++ 关系运算符重载
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.4" data-path="Text/66.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/66.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.4.</b>
                        
                        C++ 输入/输出运算符重载
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.5" data-path="Text/67.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/67.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.5.</b>
                        
                        C++ ++ 和 -- 运算符重载
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.6" data-path="Text/68.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/68.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.6.</b>
                        
                        C++ 赋值运算符重载
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.7" data-path="Text/69.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/69.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.7.</b>
                        
                        C++ 函数调用运算符 重载
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.8" data-path="Text/70.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/70.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.8.</b>
                        
                        C++ 下标运算符 重载
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.9" data-path="Text/71.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/71.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.9.</b>
                        
                        C++ 类成员访问运算符 -&amp;gt; 重载
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="Text/72.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/72.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        C++ 多态
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="Text/73.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/73.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        C++ 数据抽象
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="Text/74.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/74.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        C++ 数据封装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="Text/75.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/75.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        C++ 接口（抽象类）
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="Text/76.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/76.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        C++ 高级
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="Text/77.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/77.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        C++ 文件和流
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="Text/78.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/78.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        C++ 异常处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="Text/79.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/79.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        C++ 动态内存
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="Text/80.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/80.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        C++ 命名空间
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="Text/81.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/81.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        C++ 模板
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="Text/82.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/82.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        C++ 预处理器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="Text/83.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/83.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.7.</b>
                        
                        C++ 信号处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="Text/84.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/84.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.</b>
                        
                        C++ 多线程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="Text/85.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/85.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.9.</b>
                        
                        C++ Web 编程
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="Text/86.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/86.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        C++ 资源库
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="Text/87.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/87.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        C++ STL 教程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="Text/88.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/88.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        C++ 标准库
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="Text/89.html">
            
                
                    <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/89.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        C++ 有用的资源
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com/" target="blank" class="gitbook-link">

                    本書使用 GitBook 釋出
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <a class="btn pull-left js-toolbar-action" aria-label="" href="#"><i class="fa fa-align-justify"></i></a><a class="btn pull-left js-toolbar-action" aria-label="Search" href="#"><i class="fa fa-search"></i></a><div class="dropdown pull-right  js-toolbar-action"><a class="btn toggle-dropdown" aria-label="Share" href="#"><i class="fa fa-share-alt"></i></a><div class="dropdown-menu dropdown-left"><div class="dropdown-caret"><span class="caret-outer"></span><span class="caret-inner"></span></div><div class="buttons"><button class="button size-5 ">Facebook</button><button class="button size-5 ">Google+</button><button class="button size-5 ">Twitter</button><button class="button size-5 ">Weibo</button><button class="button size-5 ">Instapaper</button></div></div></div><a class="btn pull-right js-toolbar-action" aria-label="" href="#"><i class="fa fa-facebook"></i></a><a class="btn pull-right js-toolbar-action" aria-label="" href="#"><i class="fa fa-twitter"></i></a><div class="dropdown pull-left font-settings js-toolbar-action"><a class="btn toggle-dropdown" aria-label="Font Settings" href="#"><i class="fa fa-font"></i></a><div class="dropdown-menu dropdown-right"><div class="dropdown-caret"><span class="caret-outer"></span><span class="caret-inner"></span></div><div class="buttons"><button class="button size-2 font-reduce">A</button><button class="button size-2 font-enlarge">A</button></div><div class="buttons"><button class="button size-2 ">Serif</button><button class="button size-2 ">Sans</button></div><div class="buttons"><button class="button size-3 ">White</button><button class="button size-3 ">Sepia</button><button class="button size-3 ">Night</button></div></div></div><h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/">W3School C++ 教程</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="c-入门">C++ 入门</h1>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/index.html" class="navigation navigation-prev " aria-label="Previous page: 介紹"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="https://wizardforcel.gitbooks.io/w3school-cpp/content/Text/0001-cpp-intro.html" class="navigation navigation-next " aria-label="Next page: C++ 简介" style="margin-right: 0px;"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="analytics.js" async=""></script><script async="" src="analytics.js"></script><script src="app.js"></script>

    
    <script src="plugin.js"></script>
    

    
    <script src="lunr.min.js"></script>
    

    
    <script src="search.js"></script>
    

    
    <script src="buttons.js"></script>
    

    
    <script src="buttons_001.js"></script>
    

<script>

require(["gitbook"], function(gitbook) {
    var config = {"comment":{"highlightCommented":true},"autocover":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    
<div><script style="display: none;" type="application/javascript">

  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-57505611-7', 'auto', {name: 'microcdn'});
  ga('microcdn.send', 'pageview');

  var _cdn_prev_loc = window.location.pathname;
  window.setInterval(function () {
    if (window.location.pathname !== _cdn_prev_loc) {
      _cdn_prev_loc = window.location.pathname;
      ga('microcdn.send', 'pageview');
    }
  }, 100);

</script></div>

    

</body>
</html>
